package model

// StockFilesModel 结构体
type StockFilesModel struct {
	Id          int        `gorm:"column:id;isNullable:NO;"`
	FileName    string     `gorm:"column:file_name;comment:文件名称;isNullable:NO;size:150;"`
	FileType    int        `gorm:"column:file_type;isNullable:NO;"`
	FilePath    string     `gorm:"column:file_path;comment:文件下载地址;isNullable:NO;size:255;"`
	Status      string     `gorm:"column:status;comment:状态 Y/N 正常/禁用;default:Y;isNullable:YES;size:10;"`
	Drive       string     `gorm:"column:drive;default:local;isNullable:YES;"`
	FileEffect  string     `gorm:"column:file_effect;comment:文件作用;isNullable:YES;size:255;"`
	FileSuffix  string     `gorm:"column:file_suffix;comment:文件后缀;isNullable:YES;size:100;"`
	CreateBy    string     `gorm:"column:create_by;comment:文件上传者;isNullable:NO;size:150;"`
	CreateTime  *LocalTime `gorm:"column:create_time;default:CURRENT_TIMESTAMP;isNullable:NO;"`
	LastUpdTime *LocalTime `gorm:"column:last_upd_time;default:CURRENT_TIMESTAMP;isNullable:NO;"`
}

func NewStockFilesModel() *StockFilesModel {
	return &StockFilesModel{}
}

// TableName StockFiles 表名
func (a *StockFilesModel) TableName() string {
	return "stock_files"
}
